Optimal. Leaf size=134 \[ -\frac {8 a^5 x}{c^3}+\frac {8 i a^5 \log (\cos (e+f x))}{c^3 f}+\frac {a^5 \tan (e+f x)}{c^3 f}-\frac {16 i a^5}{3 f (c-i c \tan (e+f x))^3}-\frac {24 i a^5}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {16 i a^5 c^5}{f \left (c^4-i c^4 \tan (e+f x)\right )^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 134, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45}
\begin {gather*} \frac {a^5 \tan (e+f x)}{c^3 f}-\frac {24 i a^5}{f \left (c^3-i c^3 \tan (e+f x)\right )}+\frac {8 i a^5 \log (\cos (e+f x))}{c^3 f}-\frac {8 a^5 x}{c^3}+\frac {16 i a^5 c^5}{f \left (c^4-i c^4 \tan (e+f x)\right )^2}-\frac {16 i a^5}{3 f (c-i c \tan (e+f x))^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^5}{(c-i c \tan (e+f x))^3} \, dx &=\left (a^5 c^5\right ) \int \frac {\sec ^{10}(e+f x)}{(c-i c \tan (e+f x))^8} \, dx\\ &=\frac {\left (i a^5\right ) \text {Subst}\left (\int \frac {(c-x)^4}{(c+x)^4} \, dx,x,-i c \tan (e+f x)\right )}{c^4 f}\\ &=\frac {\left (i a^5\right ) \text {Subst}\left (\int \left (1+\frac {16 c^4}{(c+x)^4}-\frac {32 c^3}{(c+x)^3}+\frac {24 c^2}{(c+x)^2}-\frac {8 c}{c+x}\right ) \, dx,x,-i c \tan (e+f x)\right )}{c^4 f}\\ &=-\frac {8 a^5 x}{c^3}+\frac {8 i a^5 \log (\cos (e+f x))}{c^3 f}+\frac {a^5 \tan (e+f x)}{c^3 f}-\frac {16 i a^5}{3 f (c-i c \tan (e+f x))^3}+\frac {16 i a^5}{c f (c-i c \tan (e+f x))^2}-\frac {24 i a^5}{f \left (c^3-i c^3 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(923\) vs. \(2(134)=268\).
time = 6.91, size = 923, normalized size = 6.89 \begin {gather*} -\frac {8 x \cos (5 e) \cos ^5(e+f x) (a+i a \tan (e+f x))^5}{c^3 (\cos (f x)+i \sin (f x))^5}+\frac {4 i \cos (5 e) \cos ^5(e+f x) \log \left (\cos ^2(e+f x)\right ) (a+i a \tan (e+f x))^5}{c^3 f (\cos (f x)+i \sin (f x))^5}+\frac {\cos (6 f x) \cos ^5(e+f x) \left (-\frac {2 i \cos (e)}{3 c^3}+\frac {2 \sin (e)}{3 c^3}\right ) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {\cos (4 f x) \cos ^5(e+f x) \left (\frac {2 i \cos (e)}{c^3}+\frac {2 \sin (e)}{c^3}\right ) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {\cos (2 f x) \cos ^5(e+f x) \left (-\frac {6 i \cos (3 e)}{c^3}-\frac {6 \sin (3 e)}{c^3}\right ) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {8 i x \cos ^5(e+f x) \sin (5 e) (a+i a \tan (e+f x))^5}{c^3 (\cos (f x)+i \sin (f x))^5}+\frac {4 \cos ^5(e+f x) \log \left (\cos ^2(e+f x)\right ) \sin (5 e) (a+i a \tan (e+f x))^5}{c^3 f (\cos (f x)+i \sin (f x))^5}+\frac {\cos ^4(e+f x) \left (\frac {\cos (5 e)}{c^3}-\frac {i \sin (5 e)}{c^3}\right ) \sin (f x) (a+i a \tan (e+f x))^5}{f \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) (\cos (f x)+i \sin (f x))^5}+\frac {\cos ^5(e+f x) \left (\frac {6 \cos (3 e)}{c^3}-\frac {6 i \sin (3 e)}{c^3}\right ) \sin (2 f x) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {\cos ^5(e+f x) \left (-\frac {2 \cos (e)}{c^3}+\frac {2 i \sin (e)}{c^3}\right ) \sin (4 f x) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {\cos ^5(e+f x) \left (\frac {2 \cos (e)}{3 c^3}+\frac {2 i \sin (e)}{3 c^3}\right ) \sin (6 f x) (a+i a \tan (e+f x))^5}{f (\cos (f x)+i \sin (f x))^5}+\frac {x \cos ^5(e+f x) \left (\frac {4 \cos ^3(e)}{c^3}-\frac {4 \cos ^5(e)}{c^3}-\frac {16 i \cos ^2(e) \sin (e)}{c^3}+\frac {24 i \cos ^4(e) \sin (e)}{c^3}-\frac {24 \cos (e) \sin ^2(e)}{c^3}+\frac {60 \cos ^3(e) \sin ^2(e)}{c^3}+\frac {16 i \sin ^3(e)}{c^3}-\frac {80 i \cos ^2(e) \sin ^3(e)}{c^3}-\frac {60 \cos (e) \sin ^4(e)}{c^3}+\frac {24 i \sin ^5(e)}{c^3}+\frac {4 \sin ^3(e) \tan (e)}{c^3}+\frac {4 \sin ^5(e) \tan (e)}{c^3}-i \left (\frac {8 \cos (5 e)}{c^3}-\frac {8 i \sin (5 e)}{c^3}\right ) \tan (e)\right ) (a+i a \tan (e+f x))^5}{(\cos (f x)+i \sin (f x))^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.24, size = 71, normalized size = 0.53
method | result | size |
derivativedivides | \(\frac {a^{5} \left (\tan \left (f x +e \right )+\frac {24}{\tan \left (f x +e \right )+i}-\frac {16}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {16 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}-8 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{3}}\) | \(71\) |
default | \(\frac {a^{5} \left (\tan \left (f x +e \right )+\frac {24}{\tan \left (f x +e \right )+i}-\frac {16}{3 \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {16 i}{\left (\tan \left (f x +e \right )+i\right )^{2}}-8 i \ln \left (\tan \left (f x +e \right )+i\right )\right )}{f \,c^{3}}\) | \(71\) |
risch | \(-\frac {2 i a^{5} {\mathrm e}^{6 i \left (f x +e \right )}}{3 c^{3} f}+\frac {2 i a^{5} {\mathrm e}^{4 i \left (f x +e \right )}}{c^{3} f}-\frac {6 i a^{5} {\mathrm e}^{2 i \left (f x +e \right )}}{c^{3} f}+\frac {16 a^{5} e}{f \,c^{3}}+\frac {2 i a^{5}}{f \,c^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}+\frac {8 i a^{5} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f \,c^{3}}\) | \(126\) |
norman | \(\frac {\frac {a^{5} \left (\tan ^{7}\left (f x +e \right )\right )}{c f}-\frac {40 i a^{5} \left (\tan ^{4}\left (f x +e \right )\right )}{c f}-\frac {32 i a^{5} \left (\tan ^{2}\left (f x +e \right )\right )}{c f}-\frac {8 a^{5} x}{c}-\frac {40 i a^{5}}{3 c f}-\frac {24 a^{5} x \left (\tan ^{2}\left (f x +e \right )\right )}{c}-\frac {24 a^{5} x \left (\tan ^{4}\left (f x +e \right )\right )}{c}-\frac {8 a^{5} x \left (\tan ^{6}\left (f x +e \right )\right )}{c}+\frac {9 a^{5} \tan \left (f x +e \right )}{c f}+\frac {41 a^{5} \left (\tan ^{3}\left (f x +e \right )\right )}{3 c f}+\frac {27 a^{5} \left (\tan ^{5}\left (f x +e \right )\right )}{c f}}{c^{2} \left (1+\tan ^{2}\left (f x +e \right )\right )^{3}}-\frac {4 i a^{5} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{c^{3} f}\) | \(227\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.53, size = 127, normalized size = 0.95 \begin {gather*} -\frac {2 \, {\left (i \, a^{5} e^{\left (8 i \, f x + 8 i \, e\right )} - 2 i \, a^{5} e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, a^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + 9 i \, a^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - 3 i \, a^{5} + 12 \, {\left (-i \, a^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - i \, a^{5}\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )\right )}}{3 \, {\left (c^{3} f e^{\left (2 i \, f x + 2 i \, e\right )} + c^{3} f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.39, size = 202, normalized size = 1.51 \begin {gather*} \frac {2 i a^{5}}{c^{3} f e^{2 i e} e^{2 i f x} + c^{3} f} + \frac {8 i a^{5} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{c^{3} f} + \begin {cases} \frac {- 2 i a^{5} c^{6} f^{2} e^{6 i e} e^{6 i f x} + 6 i a^{5} c^{6} f^{2} e^{4 i e} e^{4 i f x} - 18 i a^{5} c^{6} f^{2} e^{2 i e} e^{2 i f x}}{3 c^{9} f^{3}} & \text {for}\: c^{9} f^{3} \neq 0 \\\frac {x \left (4 a^{5} e^{6 i e} - 8 a^{5} e^{4 i e} + 12 a^{5} e^{2 i e}\right )}{c^{3}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 253 vs. \(2 (123) = 246\).
time = 1.03, size = 253, normalized size = 1.89 \begin {gather*} -\frac {2 \, {\left (-\frac {60 i \, a^{5} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{c^{3}} + \frac {120 i \, a^{5} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c^{3}} - \frac {60 i \, a^{5} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{c^{3}} - \frac {15 \, {\left (-4 i \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 4 i \, a^{5}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )} c^{3}} + \frac {2 \, {\left (-147 i \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{6} + 942 \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2445 i \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - 3460 \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2445 i \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 942 \, a^{5} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 147 i \, a^{5}\right )}}{c^{3} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}^{6}}\right )}}{15 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.69, size = 138, normalized size = 1.03 \begin {gather*} \frac {a^5\,\left (\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,8{}\mathrm {i}+31\,\mathrm {tan}\left (e+f\,x\right )+24\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,\mathrm {tan}\left (e+f\,x\right )-\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^2\,24{}\mathrm {i}-8\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^2\,21{}\mathrm {i}+3\,{\mathrm {tan}\left (e+f\,x\right )}^3-{\mathrm {tan}\left (e+f\,x\right )}^4\,1{}\mathrm {i}+\frac {40}{3}{}\mathrm {i}\right )}{c^3\,f\,{\left (-1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________